<template>
  <div>
    <div v-for="(x, i) in list" :key="i">
      <li>{{ x.title }}</li>
      <li>{{ x.render(x) }}222222222</li>
    </div>

    <el-button onClick="{click}" type="primary">
      {" "} Click to download PDF {title}{" "}
    </el-button>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref, reactive, toRefs } from "vue";
interface ListType {
  title: string;
  render: Function;
}
interface HomeProps {
  title: String;
  list: Array<ListType>;
}

export default defineComponent({
  name: "demo",
  props: {
    list: Array,
    title: String,
  },
  setup(props) {
    const click = () => {
      alert("helloword");
    };
    const title = props.title;
    // let listnow:[ListType]
    console.log(props.list);
    const list = props.list;

    return { list, title };
  },
});
</script>
